package com.example.supplierfinancin.controller;

import com.example.util.ContractTools;
import com.google.gson.JsonObject;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
//@RequestMapping("deploy")
public class DeployController {
    @PostMapping("deploy")
    public static String deploycontract(String privatekey){
        JsonObject ret=new JsonObject();
        Boolean temp= ContractTools.deploycontract(privatekey);
        ret.addProperty("status",temp);
        return ret.toString();
    }
}
